//  初始化 state
const state = {

    /**
     * 网站名称
     */
    websiteName : 'CjLgb Admin System',

    /**
     * 网站描述
     */
    websiteDesc : '"吃惊老干部" 后台管理系统',

    /**
     * Logo
     */
    logo : 'https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg',

    /**
     * 菜单折叠状态
     */
    collapsed : false,

    /**
     * 加载中
     */
    loading : false,
};

const getters = {
    getWebsiteName : state => state.websiteName,
    getWebsiteDesc : state => state.websiteDesc,
    getLogo : state => state.logo,
    getCollapsed : state => state.collapsed,
    getLoading : state => state.loading
};

const mutations = {
    /**
     * 改变菜单折叠状态
     * @param state
     * @returns {boolean}
     */
    updateCollapsed : state => state.collapsed = !state.collapsed,
    /**
     * 设置加载状态
     * @param state
     * @param isLoading
     * @returns {*}
     */
    setLoading : (state,isLoading) => state.loading = isLoading,
};

const actions = {

};

export default {
    state : state,
    getters : getters,
    mutations : mutations,
    actions : actions
};
